package cn.com.dcsgo.service.impl;

import cn.com.dcsgo.domain.vo.SaleOpportunityVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.com.dcsgo.domain.po.SaleOpportunity;
import cn.com.dcsgo.service.SaleOpportunityService;
import cn.com.dcsgo.mapper.SaleOpportunityMapper;
import org.springframework.stereotype.Service;

/**
 * 针对表【sale_opportunity(销售机会表)】的数据库操作Service实现
 *
 * @author Dcsgo
 * @since 13/5/2025 上午 10:54
 */
@Service
public class SaleOpportunityServiceImpl extends ServiceImpl<SaleOpportunityMapper, SaleOpportunity>
        implements SaleOpportunityService {

    @Override
    public IPage<SaleOpportunityVO> getPage(Page<SaleOpportunityVO> pageParam, SaleOpportunityVO saleOpportunityVO) {
        return baseMapper.selectSaleOpportunityVOPage(
                pageParam,
                saleOpportunityVO.getSaleOpportunityId(),
                saleOpportunityVO.getCustName(),
                saleOpportunityVO.getPhone(),
                saleOpportunityVO.getGrade(),
                saleOpportunityVO.getCustType(),
                saleOpportunityVO.getExpectedTransactionAmount(),
                saleOpportunityVO.getCurrentStage(),
                saleOpportunityVO.getSourceChannelId(),
                saleOpportunityVO.getEmpId()
        );
    }
}




